package com.itheima.web;

import com.itheima.dao.book;
import com.itheima.service.bookservice;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class AppForAnnotation {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext cxl = new ClassPathXmlApplicationContext("applicationContext.xml");
        book book = (com.itheima.dao.book) cxl.getBean("book");
        System.out.println(book);

        bookservice bookservice = (com.itheima.service.bookservice) cxl.getBean(bookservice.class);
        bookservice.save();
    }
}
